#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include "DbConnection.h"
#include <QSplitter>
#include <QCloseEvent>
#include "docviewer.h"
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(const QString&FileConfig,DbConnection* Connection,QWidget *parent = 0);
    bool  initialization();
    ~MainWindow();
private:
    DbConnection *m_db;
    DocViewer m_viewer;
    QToolBar* m_toolBar;
    QString m_fileConfig;
    QSplitter* m_splitter;
    bool readSettings();
    void saveSettings();
    void closeEvent(QCloseEvent *event);
signals:
    void init_message(const QString&mess,int alignment, const QColor&color);
private slots:
    void setToolBar(QList<QAction*> actions);
    void showHelp();
};

#endif // MAINWINDOW_H
